#include<bits/stdc++.h>
#define int long long
#define db long double
using namespace std;
const int N=505;
inline int read(){
	int x=0,f=1;char ch=getchar();
	while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
	while(isdigit(ch)){x=(x<<1)+(x<<3)+ch-48,ch=getchar();}
	return x*f;
}
int o,n,m,b[N],tot;
db ans=1e9,f[2][N][N];

struct Node{
	int x,y,id;
}a[N],c[N];
bool vis[N];

inline bool cmp(Node a,Node b){
	if(a.y==b.y&&a.y==-1) return a.x<b.x;
	if(b.y==-1) return 1;
	if(a.y==-1) return 0;
	return a.y<b.y;
}

void solve(){
	for(int i=0;i<=n;i++){
		if(a[i].y==-1) break;
		db res=0;
		int cnt=1;
		for(int j=1;j<=i;j++){
			res=(res+(db)a[j].y/(db)cnt);
			cnt++;
		}
		if(i>=m){
			ans=min(ans,res);
			continue;
		}
		tot=0;
		for(int j=i+1;j<=n;j++) b[++tot]=a[j].x;
		sort(b+1,b+1+tot);
		for(int j=1;j<=m-i;j++) res=(res+(db)b[j]/(db)cnt);
		ans=min(ans,res);
	}
}

signed main(){
	freopen("talk.in","r",stdin);
	freopen("talk.out","w",stdout);
	n=read(),m=read();
	for(int i=1;i<=n;i++) a[i].x=read(),a[i].y=read();
	for(int i=1;i<=n;i++) c[i]=a[i];
	sort(a+1,a+1+n,cmp);
	solve();
	o=1;
	for(int i=0;i<=n;i++)
		for(int j=0;j<=n;j++)
			f[0][i][j]=1e9;
	f[0][0][0]=0;
	for(int i=0;i<n;i++){
		o^=1;
		for(int j=0;j<=n;j++)
			for(int k=0;k<=n;k++)
				f[o^1][j][k]=f[o][j][k];
		for(int j=0;j<=n;j++){
			for(int k=0;k<=n;k++){
				if(j<m) f[o^1][j+1][k]=min(f[o^1][j+1][k],f[o][j][k]+(db)a[i+1].x/(db)(k+1));
				if(j<m&&a[i+1].y!=-1) f[o^1][j+1][k+1]=min(f[o^1][j+1][k+1],f[o][j][k]+(db)a[i+1].y/(db)(k+1));
			}
		}
	}
	for(int i=0;i<=n;i++)
		ans=min(ans,f[o^1][m][i]);
	printf("%.15Lf",ans);
	return 0;
}
/*
7
5
28 36
11 57
20 35
19 27
31 33
25 56
38 51
*/